<?php
/**
 * Created by PhpStorm.
 * User: thuannt93
 * Date: 2/26/14
 * Time: 2:24 PM
 */

class LogicBusiness {
    /**
     * check options to delete or insert to db
     * @param $new array list new option
     * @param $old array list old option
     * @return array
     */
    public static function checkNewOptions($new,$old){
        if(!$new)
            $new = array();
        if(!$old)
            $old = array();
        $result = array();
        $result['insert']= array_diff($new,$old);
        $result['delete']= array_diff($old,$new);
        return $result;
    }

} 